package com.googlecode.gwtbb.client.only.widget.form;

import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.ClickListener;
import com.google.gwt.user.client.ui.Widget;

/**
 * @author Abraham Grief
 * @version $Id$
 * @since Dec 15, 2008
 */
public abstract class FormDialogButton extends Button implements ClickListener, FormStarter {
	public FormDialogButton(String buttonText) {
		super(buttonText);
		addClickListener(this);
	}

	public FormWidget getForm() {
		return getFormStarter().getForm();
	}

	public abstract FormStarter getFormStarter();

	public void onClick(Widget sender) {
		startProcess();
	}
}
